package com.esunny.online.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author ：李先生
 * @date ：Created in 2020/7/16 14:46
 * @description：  测试请求类
 * @modified By：
 * @version: $
 */
@Api(value = "测试请求类")
@Controller
public class HelloController {


    /**
     * 测试项目是否可用接口
     * @return "hello world"
     */
    @ApiOperation(value = "测试接口")
    @ApiResponse(code = 400,message = "请求失败",response = String.class)
    @RequestMapping(path = "/hello",method = RequestMethod.GET)
    @ResponseBody
    @CrossOrigin
    public String test(){
        System.out.println("hello");
        return "hello world";
    }
}
